<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/WEB-INF/jsp/taglibs-struts2.jsp" %>

<div id="content">
  <div id="breadCrumb"> <a href="#">字典管理</a> / <a href="city|listCity.action">考点考场管理</a> / <a href="#">breadcrumb</a> / </div>
  <h2 id="pageName">考点考场管理</h2>
  <form action="college|listCollegeField.action" method="post">
  <div>
  	<input type="text" name="searchWord" value="<c:out value="${param['searchWord']}"/>">
  	<select name="isValid" size="1">
  		<option value="0">全部</option><option value="1" <c:if test="${param['isValid']==1}">selected</c:if>>有效</option><option value="2" <c:if test="${param['isValid']==2}">selected</c:if>>无效</option>
  	</select> 
  </div>
  <c:set var="pageLnk" value="city|listCity.action?searchWord=${param['searchWord']}&isValid=${param['isValid']}"/>
  <%@include file="../common/pageNav.jsp" %>
  </form>
  <div class="story">
    <table border="0" cellpadding="3">
      <tr><td></td><th>考场名称</th><th>考场编码</th><th>考点名称</th><th>考场人数</th><th>是否有效</th></tr>
      <c:forEach var="field" items="${fieldList}">
      	<tr>
      		<td><input type="checkbox"></td>
      		<td><a href="<c:url value="college|saveCollegeField.action"><c:param name="collegeFieldId" value="${field.id}"/></c:url>"><c:out value="${field.ftName}"/></a></td>
      		<td><c:out value="${field.ftCode}"/></td>
      		<td><c:out value="${field.college.collegeName}"/></td>
      		<td><c:out value="${field.ftCount}"/></td>
      		<td><c:choose>
      			<c:when test="${field.ifValid}"><img src="<c:url value="/images/true.gif"/>" width="14" height="14" /></c:when>
      			<c:otherwise><img src="<c:url value="/images/false.gif"/>" width="14" height="14" /></c:otherwise>
      		</c:choose></td>
      	</tr>
      </c:forEach>
    </table>
  </div>
  
  <div>
  	<input type="button" name="addField" value="添加" onclick="createNewField()"/>
  </div>
</div>

<script type="text/javascript">
function createNewField() {
window.location.href = "college|saveCollegeField.action";
}
</script>